﻿/*
Post-Deployment Script Template							
--------------------------------------------------------------------------------------
 This file contains SQL statements that will be appended to the build script.		
 Use SQLCMD syntax to include a file in the post-deployment script.			
 Example:      :r .\myfile.sql								
 Use SQLCMD syntax to reference a variable in the post-deployment script.		
 Example:      :setvar TableName MyTable							
               SELECT * FROM [$(TableName)]					
--------------------------------------------------------------------------------------
*/



--Busines
DELETE FROM [dbo].[Business];

INSERT INTO [dbo].[Business]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(10, 0, '2011-09-01', '2011-09-01', N'集装箱进门', NULL);
INSERT INTO [dbo].[Business]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(20, 0, '2011-09-01', '2011-09-01', N'电子装箱', NULL);
INSERT INTO [dbo].[Business]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(30, 0, '2011-09-01', '2011-09-01', N'报关放行', NULL);
INSERT INTO [dbo].[Business]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(40, 0, '2011-09-01', '2011-09-01', N'海关查验', NULL);
INSERT INTO [dbo].[Business]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(50, 0, '2011-09-01', '2011-09-01', N'海关放行', NULL);
INSERT INTO [dbo].[Business]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(60, 0, '2011-09-01', '2011-09-01', N'集装箱上船', NULL);

--TaskState

DELETE FROM [dbo].[TaskState];

INSERT INTO [dbo].[TaskState]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(1, 0, '2011-09-01', '2011-09-01', N'已创建', NULL);
INSERT INTO [dbo].[TaskState]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(2, 0, '2011-09-01', '2011-09-01', N'正在运行', NULL);
INSERT INTO [dbo].[TaskState]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(3, 0, '2011-09-01', '2011-09-01', N'已暂停', NULL);
INSERT INTO [dbo].[TaskState]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(4, 0, '2011-09-01', '2011-09-01', N'已关闭', NULL);
INSERT INTO [dbo].[TaskState]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(5, 0, '2011-09-01', '2011-09-01', N'已取消', NULL);
INSERT INTO [dbo].[TaskState]([Id],[IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(6, 0, '2011-09-01', '2011-09-01', N'已更新', NULL);

--Role
DELETE FROM [dbo].[Role];

INSERT INTO [dbo].[Role]([IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(0, '2011-09-01', '2011-09-01', N'系统管理员', NULL);
INSERT INTO [dbo].[Role]([IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(0, '2011-09-01', '2011-09-01', N'公司管理员', NULL);
INSERT INTO [dbo].[Role]([IsDeleted],[CreatedDate],[ModifiedDate],[Name],[Description]) VALUES(0, '2011-09-01', '2011-09-01', N'用户', NULL);

--Company
Delete From [dbo].[Company];

INSERT INTO [dbo].[Company] ([IsDeleted], [CreatedDate] ,[ModifiedDate] ,[Name] ,[Address] ,[City] ,[PostalCode] ) VALUES(0, '2011-9-1', '2011-9-1', N'海关宝', N'中国', N'上海',N'120002');

--User
DELETE FROM [dbo].[User] ;

INSERT INTO [CustomsNuke].[dbo].[User]
           ([IsDeleted]
           ,[CreatedDate]
           ,[ModifiedDate]
           ,[CompanyId]
           ,[UserName]
           ,[Mobile]
           ,[Email]
           ,[Password]
           ,[FirstName]
           ,[LastName]
           ,[IsApproved]
           ,[IsLockedOut]
           ,[FailedPasswordAttemptCount]
           ,[FailedPasswordAnswerAttemptCount]
           ,[RoleId])
     VALUES
           (0,
			'2011-9-1',
			'2011-9-1',
			1,
			N'admin',
			123,
			N'123',
			N'admin',
			N'admin',
			N'admin',
			1,
			0,
			0,
			0,
			1)